﻿using Gateway.Common.Extensions;
using SqlSugar;

namespace Gateway.IQuery.Question.Result;

/// <summary>
/// 试题语言详情
/// </summary>
[SugarTable("QuestionLanguage")]
public class QuestionLanguageDetailResult
{
    /// <summary>
    /// 语言名称-显示
    /// </summary>
    public string LangText { get; set; }

    /// <summary>
    /// 试题语言标识
    /// </summary>
    public string QuestionLanguageId { get; set; }

    /// <summary>
    /// 语言
    /// </summary>
    public string Language { get; set; }

    /// <summary>
    /// 试题标识
    /// </summary>
    public string QuestionId { get; set; }

    /// <summary>
    /// 示例代码的文件名称
    /// </summary>
    public string ExamplesFileName { get; set; }

    /// <summary>
    /// 执行代码的文件名称
    /// </summary>
    public string ExecFileName { get; set; }

    /// <summary>
    /// 示例代码
    /// </summary>
    public string Examples { get; set; }

    /// <summary>
    /// 扩展代码片段
    /// </summary>
    public List<QuestionExtensionCodeDetailResult> ExtensionCodes { get; set; }


    /// <summary>
    /// 依赖的公共库的代码标识集合
    /// </summary>
    public List<string> DependCodesList => DependCodes?.ToSplitList(",") ?? new List<string>();

    /// <summary>
    /// 依赖的公共库的代码标识集合，逗号分割
    /// </summary>
    public string DependCodes { get; set; }
}